var common = {
    //递归更新数据
	updatedata(data,curdata){

        for (var i = 0; i < data.length; i++) {
            if(data[i]['id'] == curdata['id']){
                data[i]['config'] = curdata['config']
            }else if(typeof data[i]['list'] !== "undefined"){
                data[i]['list'] = common.updatedata(data[i]['list'],curdata)
            }
        }
        return data
    }
}

export { common }